<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>LS.Components.Light</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/LS.Animation.html">LS.Animation</a></li>
                                <li><a href="../classes/LS.Animation.Take.html">LS.Animation.Take</a></li>
                                <li><a href="../classes/LS.Animation.Track.html">LS.Animation.Track</a></li>
                                <li><a href="../classes/LS.BaseComponent.html">LS.BaseComponent</a></li>
                                <li><a href="../classes/LS.Collision.html">LS.Collision</a></li>
                                <li><a href="../classes/LS.ComponentContainer.html">LS.ComponentContainer</a></li>
                                <li><a href="../classes/LS.Components.Camera.html">LS.Components.Camera</a></li>
                                <li><a href="../classes/LS.Components.CameraController.html">LS.Components.CameraController</a></li>
                                <li><a href="../classes/LS.Components.CameraDirector.html">LS.Components.CameraDirector</a></li>
                                <li><a href="../classes/LS.Components.CameraFX.html">LS.Components.CameraFX</a></li>
                                <li><a href="../classes/LS.Components.Canvas3D.html">LS.Components.Canvas3D</a></li>
                                <li><a href="../classes/LS.Components.CustomData.html">LS.Components.CustomData</a></li>
                                <li><a href="../classes/LS.Components.FollowNode.html">LS.Components.FollowNode</a></li>
                                <li><a href="../classes/LS.Components.FrameFX.html">LS.Components.FrameFX</a></li>
                                <li><a href="../classes/LS.Components.FXGraphComponent.html">LS.Components.FXGraphComponent</a></li>
                                <li><a href="../classes/LS.Components.FXStack.html">LS.Components.FXStack</a></li>
                                <li><a href="../classes/LS.Components.GeometricPrimitive.html">LS.Components.GeometricPrimitive</a></li>
                                <li><a href="../classes/LS.Components.GraphComponent.html">LS.Components.GraphComponent</a></li>
                                <li><a href="../classes/LS.Components.Light.html">LS.Components.Light</a></li>
                                <li><a href="../classes/LS.Components.LightFX.html">LS.Components.LightFX</a></li>
                                <li><a href="../classes/LS.Components.LinesRenderer.html">LS.Components.LinesRenderer</a></li>
                                <li><a href="../classes/LS.Components.MeshRenderer.html">LS.Components.MeshRenderer</a></li>
                                <li><a href="../classes/LS.Components.NodeManipulator.html">LS.Components.NodeManipulator</a></li>
                                <li><a href="../classes/LS.Components.ParticlesEmissor.html">LS.Components.ParticlesEmissor</a></li>
                                <li><a href="../classes/LS.Components.PlayAnimation.html">LS.Components.PlayAnimation</a></li>
                                <li><a href="../classes/LS.Components.Poser.html">LS.Components.Poser</a></li>
                                <li><a href="../classes/LS.Components.RealtimeReflector.html">LS.Components.RealtimeReflector</a></li>
                                <li><a href="../classes/LS.Components.Rotator.html">LS.Components.Rotator</a></li>
                                <li><a href="../classes/LS.Components.SceneInclude.html">LS.Components.SceneInclude</a></li>
                                <li><a href="../classes/LS.Components.Script.html">LS.Components.Script</a></li>
                                <li><a href="../classes/LS.Components.SkinDeformer.html">LS.Components.SkinDeformer</a></li>
                                <li><a href="../classes/LS.Components.Skybox.html">LS.Components.Skybox</a></li>
                                <li><a href="../classes/LS.Components.Spline.html">LS.Components.Spline</a></li>
                                <li><a href="../classes/LS.Components.SVGRenderer.html">LS.Components.SVGRenderer</a></li>
                                <li><a href="../classes/LS.Components.Target.html">LS.Components.Target</a></li>
                                <li><a href="../classes/LS.Components.Transform.html">LS.Components.Transform</a></li>
                                <li><a href="../classes/LS.Components.VRCameraController.html">LS.Components.VRCameraController</a></li>
                                <li><a href="../classes/LS.CompositePattern.html">LS.CompositePattern</a></li>
                                <li><a href="../classes/LS.DebugRender.html">LS.DebugRender</a></li>
                                <li><a href="../classes/LS.Draw.html">LS.Draw</a></li>
                                <li><a href="../classes/LS.Formats.html">LS.Formats</a></li>
                                <li><a href="../classes/LS.GLSLCode.html">LS.GLSLCode</a></li>
                                <li><a href="../classes/LS.GraphCode.html">LS.GraphCode</a></li>
                                <li><a href="../classes/LS.GUI.html">LS.GUI</a></li>
                                <li><a href="../classes/LS.Input.html">LS.Input</a></li>
                                <li><a href="../classes/LS.InteractiveController.html">LS.InteractiveController</a></li>
                                <li><a href="../classes/LS.Knob.html">LS.Knob</a></li>
                                <li><a href="../classes/LS.LS.html">LS.LS</a></li>
                                <li><a href="../classes/LS.LScript.html">LS.LScript</a></li>
                                <li><a href="../classes/LS.Material.html">LS.Material</a></li>
                                <li><a href="../classes/LS.oldStandardMaterial.html">LS.oldStandardMaterial</a></li>
                                <li><a href="../classes/LS.Pack.html">LS.Pack</a></li>
                                <li><a href="../classes/LS.Particle.html">LS.Particle</a></li>
                                <li><a href="../classes/LS.Physics.html">LS.Physics</a></li>
                                <li><a href="../classes/LS.PhysicsInstance.html">LS.PhysicsInstance</a></li>
                                <li><a href="../classes/LS.Picking.html">LS.Picking</a></li>
                                <li><a href="../classes/LS.Player.html">LS.Player</a></li>
                                <li><a href="../classes/LS.Prefab.html">LS.Prefab</a></li>
                                <li><a href="../classes/LS.Project.html">LS.Project</a></li>
                                <li><a href="../classes/LS.Ray.html">LS.Ray</a></li>
                                <li><a href="../classes/LS.Renderer.html">LS.Renderer</a></li>
                                <li><a href="../classes/LS.RenderFrameContext.html">LS.RenderFrameContext</a></li>
                                <li><a href="../classes/LS.RenderInstance.html">LS.RenderInstance</a></li>
                                <li><a href="../classes/LS.RenderSettings.html">LS.RenderSettings</a></li>
                                <li><a href="../classes/LS.RenderState.html">LS.RenderState</a></li>
                                <li><a href="../classes/LS.Resource.html">LS.Resource</a></li>
                                <li><a href="../classes/LS.ResourcesManager.html">LS.ResourcesManager</a></li>
                                <li><a href="../classes/LS.Scene.html">LS.Scene</a></li>
                                <li><a href="../classes/LS.SceneNode.html">LS.SceneNode</a></li>
                                <li><a href="../classes/LS.ShaderBlock.html">LS.ShaderBlock</a></li>
                                <li><a href="../classes/LS.ShaderCode.html">LS.ShaderCode</a></li>
                                <li><a href="../classes/LS.ShaderGraph.html">LS.ShaderGraph</a></li>
                                <li><a href="../classes/LS.ShaderMaterial.html">LS.ShaderMaterial</a></li>
                                <li><a href="../classes/LS.Shaders.html">LS.Shaders</a></li>
                                <li><a href="../classes/LS.SpatialContainer.html">LS.SpatialContainer</a></li>
                                <li><a href="../classes/LS.StandardMaterial.html">LS.StandardMaterial</a></li>
                                <li><a href="../classes/LS.Tween.html">LS.Tween</a></li>
                                <li><a href="../classes/LS.UnityMaterial.html">LS.UnityMaterial</a></li>
                                <li><a href="../classes/LS.WBin.html">LS.WBin</a></li>
                                <li><a href="../classes/LSQ.html">LSQ</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                                <li><a href="../modules/LS.html">LS</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>LS.Components.Light Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_components_light.js.html#l3"><code>..&#x2F;src&#x2F;components&#x2F;light.js:3</code></a>
        </div>

            Module: <a href="../modules/LS.html">LS</a>

</div>


<div class="box intro">
    <p>Light contains all the info about the light (type: SPOT, OMNI, DIRECTIONAL, attenuations, shadows, etc)</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_LS.Components.Light" class="method item">
    <h3 class="name"><code>LS.Components.Light</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l3"><code>..&#x2F;src&#x2F;components&#x2F;light.js:3</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>to configure from</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_applyTransformMatrix">applyTransformMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_computeLightIntensity">computeLightIntensity</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_computeLightRadius">computeLightRadius</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_computeShadowmapFar">computeShadowmapFar</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_generateShadowmap">generateShadowmap</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getFront">getFront</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalMatrix">getGlobalMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getLightCamera">getLightCamera</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getPosition">getPosition</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getQuery">getQuery</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTarget">getTarget</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTransformMatrix">getTransformMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getUp">getUp</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_prepare">prepare</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_updateVectors">updateVectors</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property_angle">angle</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_angle_end">angle_end</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_attenuation_type">attenuation_type</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_cast_shadows">cast_shadows</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_color">color</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_enabled">enabled</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_far">far</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_intensity">intensity</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_layers">layers</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_near">near</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_position">position</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_target">target</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_up">up</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_applyTransformMatrix" class="method item">
    <h3 class="name"><code>applyTransformMatrix</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>matrix</code>
                </li>
                <li class="arg">
                        <code>center</code>
                </li>
                <li class="arg">
                        <code>property_name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Mat4</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l832"><code>..&#x2F;src&#x2F;components&#x2F;light.js:832</code></a>
        </p>



    </div>

    <div class="description">
        <p>apply a transformation to a given light property, this is done in a function to allow more complex gizmos</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">matrix</code>
                        <span class="type">Mat4</span>


                    <div class="param-description">
                        <p>transformation in matrix form</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">center</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>�?</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">property_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>&quot;target&quot; or &quot;position&quot;</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Mat4</span>:
                    <p>mat4</p>

            </div>
        </div>


</div>
<div id="method_computeLightIntensity" class="method item">
    <h3 class="name"><code>computeLightIntensity</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l683"><code>..&#x2F;src&#x2F;components&#x2F;light.js:683</code></a>
        </p>



    </div>

    <div class="description">
        <p>Computes the max amount of light this object can produce (taking into account every color channel)</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>intensity</p>

            </div>
        </div>


</div>
<div id="method_computeLightRadius" class="method item">
    <h3 class="name"><code>computeLightRadius</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l694"><code>..&#x2F;src&#x2F;components&#x2F;light.js:694</code></a>
        </p>



    </div>

    <div class="description">
        <p>Computes the light radius according to the attenuation</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>radius</p>

            </div>
        </div>


</div>
<div id="method_computeShadowmapFar" class="method item">
    <h3 class="name"><code>computeShadowmapFar</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l657"><code>..&#x2F;src&#x2F;components&#x2F;light.js:657</code></a>
        </p>



    </div>

    <div class="description">
        <p>Optimization: instead of using the far plane, we take into account the attenuation to avoid rendering objects where the light will never reach</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>distance</p>

            </div>
        </div>


</div>
<div id="method_generateShadowmap" class="method item">
    <h3 class="name"><code>generateShadowmap</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l711"><code>..&#x2F;src&#x2F;components&#x2F;light.js:711</code></a>
        </p>



    </div>

    <div class="description">
        <p>Generates the shadowmap for this light</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>render_settings</p>

            </div>
        </div>


</div>
<div id="method_getFront" class="method item">
    <h3 class="name"><code>getFront</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l429"><code>..&#x2F;src&#x2F;components&#x2F;light.js:429</code></a>
        </p>



    </div>

    <div class="description">
        <p>returns a copy of the front vector (in global coordinates)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>optional</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>the front vector</p>

            </div>
        </div>


</div>
<div id="method_getGlobalMatrix" class="method item">
    <h3 class="name"><code>getGlobalMatrix</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Mat4</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l790"><code>..&#x2F;src&#x2F;components&#x2F;light.js:790</code></a>
        </p>



    </div>

    <div class="description">
        <p>It returns the global matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Mat4</span>


                    <div class="param-description">
                        <p>[optional]</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Mat4</span>:
                    <p>mat4</p>

            </div>
        </div>


</div>
<div id="method_getLightCamera" class="method item">
    <h3 class="name"><code>getLightCamera</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Camera</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l329"><code>..&#x2F;src&#x2F;components&#x2F;light.js:329</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the camera that will match the light orientation (taking into account fov, etc), useful for shadowmaps</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Camera</span>:
                    <p>the camera</p>

            </div>
        </div>


</div>
<div id="method_getPosition" class="method item">
    <h3 class="name"><code>getPosition</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l382"><code>..&#x2F;src&#x2F;components&#x2F;light.js:382</code></a>
        </p>



    </div>

    <div class="description">
        <p>returns a copy of the light position (in global coordinates), if you want local you can access the position property</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>optional</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>the position</p>

            </div>
        </div>


</div>
<div id="method_getQuery" class="method item">
    <h3 class="name"><code>getQuery</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>instance</code>
                </li>
                <li class="arg">
                        <code>render_settings</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">ShaderQuery</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l615"><code>..&#x2F;src&#x2F;components&#x2F;light.js:615</code></a>
        </p>



    </div>

    <div class="description">
        <p>Collects and returns the shader query of the light (some macros have to be computed now because they depend not only on the light, also on the node or material)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">instance</code>
                        <span class="type">RenderInstance</span>


                    <div class="param-description">
                        <p>the render instance where this light will be applied</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">render_settings</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>info about how the scene will be rendered</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">ShaderQuery</span>:
                    <p>the macros</p>

            </div>
        </div>


</div>
<div id="method_getTarget" class="method item">
    <h3 class="name"><code>getTarget</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l398"><code>..&#x2F;src&#x2F;components&#x2F;light.js:398</code></a>
        </p>



    </div>

    <div class="description">
        <p>returns a copy of the light target (in global coordinates), if you want local you can access the target property</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>optional</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>the target</p>

            </div>
        </div>


</div>
<div id="method_getTransformMatrix" class="method item">
    <h3 class="name"><code>getTransformMatrix</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>element</code>
                </li>
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Mat4</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l807"><code>..&#x2F;src&#x2F;components&#x2F;light.js:807</code></a>
        </p>



    </div>

    <div class="description">
        <p>It returns a matrix in the position of the given light property (target, position), mostly used for gizmos</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">element</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>&quot;target&quot; or &quot;position&quot;</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Mat4</span>


                    <div class="param-description">
                        <p>[optional]</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Mat4</span>:
                    <p>mat4</p>

            </div>
        </div>


</div>
<div id="method_getUp" class="method item">
    <h3 class="name"><code>getUp</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>output</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l413"><code>..&#x2F;src&#x2F;components&#x2F;light.js:413</code></a>
        </p>



    </div>

    <div class="description">
        <p>returns a copy of the light up vector (in global coordinates), if you want local you can access the up property</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">output</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>optional</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>the up vector</p>

            </div>
        </div>


</div>
<div id="method_prepare" class="method item">
    <h3 class="name"><code>prepare</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>render_settings</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l480"><code>..&#x2F;src&#x2F;components&#x2F;light.js:480</code></a>
        </p>



    </div>

    <div class="description">
        <p>This method is called by the LS.Renderer when the light needs to be prepared to be used during render (compute light camera, create shadowmaps, prepare macros, etc)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">render_settings</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>info about how the scene will be rendered</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_updateVectors" class="method item">
    <h3 class="name"><code>updateVectors</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l341"><code>..&#x2F;src&#x2F;components&#x2F;light.js:341</code></a>
        </p>



    </div>

    <div class="description">
        <p>updates all the important vectors (target, position, etc) according to the node parent of the light</p>

    </div>




</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property_angle" class="property item">
    <h3 class="name"><code>angle</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l66"><code>..&#x2F;src&#x2F;components&#x2F;light.js:66</code></a>
        </p>


    </div>

    <div class="description">
        <p>Angle for the spot light inner apperture</p>

    </div>

        <p><strong>Default:</strong> 45</p>


</div>
<div id="property_angle_end" class="property item">
    <h3 class="name"><code>angle_end</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l73"><code>..&#x2F;src&#x2F;components&#x2F;light.js:73</code></a>
        </p>


    </div>

    <div class="description">
        <p>Angle for the spot light outer apperture</p>

    </div>

        <p><strong>Default:</strong> 60</p>


</div>
<div id="property_attenuation_type" class="property item">
    <h3 class="name"><code>attenuation_type</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l86"><code>..&#x2F;src&#x2F;components&#x2F;light.js:86</code></a>
        </p>


    </div>

    <div class="description">
        <p>type of attenuation: Light.NO_ATTENUATION, Light.LINEAR_ATTENUATION, Light.RANGE_ATTENUATION</p>

    </div>

        <p><strong>Default:</strong> [1,1,1]</p>


</div>
<div id="property_cast_shadows" class="property item">
    <h3 class="name"><code>cast_shadows</code></h3>
    <span class="type">Boolean</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l121"><code>..&#x2F;src&#x2F;components&#x2F;light.js:121</code></a>
        </p>


    </div>

    <div class="description">
        <p>If the light cast shadows</p>

    </div>

        <p><strong>Default:</strong> false</p>


</div>
<div id="property_color" class="property item">
    <h3 class="name"><code>color</code></h3>
    <span class="type">Vec3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l103"><code>..&#x2F;src&#x2F;components&#x2F;light.js:103</code></a>
        </p>


    </div>

    <div class="description">
        <p>The color of the light</p>

    </div>

        <p><strong>Default:</strong> [1,1,1]</p>


</div>
<div id="property_enabled" class="property item">
    <h3 class="name"><code>enabled</code></h3>
    <span class="type">Boolean</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l34"><code>..&#x2F;src&#x2F;components&#x2F;light.js:34</code></a>
        </p>


    </div>

    <div class="description">
        <p>Enabled</p>

    </div>

        <p><strong>Default:</strong> true</p>


</div>
<div id="property_far" class="property item">
    <h3 class="name"><code>far</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l58"><code>..&#x2F;src&#x2F;components&#x2F;light.js:58</code></a>
        </p>


    </div>

    <div class="description">
        <p>Far distance</p>

    </div>

        <p><strong>Default:</strong> 1000</p>


</div>
<div id="property_intensity" class="property item">
    <h3 class="name"><code>intensity</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l110"><code>..&#x2F;src&#x2F;components&#x2F;light.js:110</code></a>
        </p>


    </div>

    <div class="description">
        <p>The intensity of the light</p>

    </div>

        <p><strong>Default:</strong> 1</p>


</div>
<div id="property_layers" class="property item">
    <h3 class="name"><code>layers</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l42"><code>..&#x2F;src&#x2F;components&#x2F;light.js:42</code></a>
        </p>


    </div>

    <div class="description">
        <p>Layers mask, this layers define which objects are iluminated by this light</p>

    </div>

        <p><strong>Default:</strong> true</p>


</div>
<div id="property_near" class="property item">
    <h3 class="name"><code>near</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l51"><code>..&#x2F;src&#x2F;components&#x2F;light.js:51</code></a>
        </p>


    </div>

    <div class="description">
        <p>Near distance</p>

    </div>

        <p><strong>Default:</strong> 1</p>


</div>
<div id="property_position" class="property item">
    <h3 class="name"><code>position</code></h3>
    <span class="type">[x,y,z]</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l12"><code>..&#x2F;src&#x2F;components&#x2F;light.js:12</code></a>
        </p>


    </div>

    <div class="description">
        <p>Position of the light in world space</p>

    </div>

        <p><strong>Default:</strong> [0,0,0]</p>


</div>
<div id="property_target" class="property item">
    <h3 class="name"><code>target</code></h3>
    <span class="type">[x,y,z]</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l19"><code>..&#x2F;src&#x2F;components&#x2F;light.js:19</code></a>
        </p>


    </div>

    <div class="description">
        <p>Position where the light is pointing at (in world space)</p>

    </div>

        <p><strong>Default:</strong> [0,0,1]</p>


</div>
<div id="property_up" class="property item">
    <h3 class="name"><code>up</code></h3>
    <span class="type">[x,y,z]</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_components_light.js.html#l26"><code>..&#x2F;src&#x2F;components&#x2F;light.js:26</code></a>
        </p>


    </div>

    <div class="description">
        <p>Up vector (in world coordinates)</p>

    </div>

        <p><strong>Default:</strong> [0,1,0]</p>


</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
